package org.example.meetingsystem.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.example.meetingsystem.enums.CancellationStatus;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("cancellation_requests")
public class CancellationRequest extends Model<CancellationRequest> {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("reservation_id")
    private Long reservationId;

    @TableField("customer_id")
    private Long customerId;

    @TableField("reason")
    private String reason;

    @TableField("refund_rate")
    private BigDecimal refundRate;

    @TableField("refund_amount")
    private BigDecimal refundAmount;

    @TableField("status")
    private CancellationStatus status;

    @TableField("processed_by")
    private Long processedBy;

    @TableField("processed_at")
    private LocalDateTime processedAt;

    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
}